package edu.cmu.cs.webapp.ioms.models.util;

public class QuarterRecord extends FinancialRecord {

	private int quarter;
	private int year;

	public QuarterRecord() {

	}

	public QuarterRecord(int year, int quarter) {
		this.quarter = quarter;
		this.year = year;
	}

	public int getQuarter() {
		return quarter;
	}

	public void setQuarter(int quarter) {
		this.quarter = quarter;
	}

	public int getYear() {
		return year;
	}

	public void setYear(int year) {
		this.year = year;
	}

	public String getPeriod() {
		return getQuarterString(quarter) + " quarter" + ", " + year;
	}

	private String getQuarterString(int quarter) {
		switch (quarter) {
		case 1:
			return "1st";
		case 2:
			return "2nd";
		case 3:
			return "3rd";
		case 4:
			return "4th";
		default:
			return "";
		}
	}

}
